cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR)

project(CMakeForQt)

set(CMAKE_AUTOMOC ON)

find_package(Qt5 COMPONENTS Widgets Core REQUIRED)
add_executable(cmakeforqt main.cpp cmakeforqt.h)
target_link_libraries(cmakeforqt Qt5::Widgets Qt5::Core)